package Calculos;

import java.util.Random;

import com.uqbar.vainilla.DeltaState;

public class CalculadoraDeVersor {

	public static void calculame(VersorCalculable vc){
		
		Random random = new Random();
		vc.setX(random.nextDouble() * vc.getGame().getDisplayWidth());
		vc.setY(random.nextDouble() * vc.getGame().getDisplayHeight());
		
		double sentidoEnX = random.nextDouble() * 2 - 1;
		double sentidoEnY = random.nextDouble() * 2 - 1;
		double m = Math.sqrt(sentidoEnX * sentidoEnX + sentidoEnY * sentidoEnY);

		sentidoEnX = sentidoEnX / m;
		sentidoEnY = sentidoEnY / m;
		vc.setVersor(sentidoEnX, sentidoEnY);

		
	}

	

	
	
}



